package com.fifth.common.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 第五组
 * @since 2022-08-31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("u_user_info")
@ApiModel(value = "UserInfo对象", description = "")
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    private String id;

    @ApiModelProperty("用户头像")
    private String uicon;

    @ApiModelProperty("用户姓名")
    private String uname;

    @ApiModelProperty("用户性别")
    private int usex;

    @ApiModelProperty("用户地址")
    private String location;

    @ApiModelProperty("用户年龄")
    private Integer age;

    @ApiModelProperty("用户手机号")
    private String telephone;

    @ApiModelProperty("用户密码")
    private String password;

    @ApiModelProperty("盐")
    @TableField(fill = FieldFill.INSERT)//添加时自动添加
    private String salt;

    @ApiModelProperty("用户状态 0正常 1冻结 ")
    @TableField(fill = FieldFill.INSERT)//添加时自动添加(默认为0)
    private Integer status;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)//添加时自动当前时间
    private LocalDateTime createtime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.UPDATE)//自动填充修改事件
    private LocalDateTime updatetime;

    @ApiModelProperty("操作人")
    private String updateman;

}
